<div class="blade-content ng-scope" id="blade-content">
  <div class="blade-inner">
    <div class="inner-block">
      <form name="form" class="form" (submit)="onCreate()" [formGroup]="formGroup" novalidate>
        <div class="blade-static __bottom" *ngIf="currentBlade.isNew">
          <button class="btn" [disabled]="!formGroup.valid">创建</button>
        </div>
        <div class="form-group">
          <label class="form-label">报警级别</label>
          <div class="form-input">
            <input name="faultLevelName" formControlName="faultLevelName" placeholder="输入报警级别名称">
          </div>
          <div *ngIf="formErrors.faultLevelName" class="form-error">
            {{ formErrors.faultLevelName }}
          </div>
        </div>

        <div class="columns">
          <div class="form-group column">
            <label class="form-label">颜色</label>
            <div class="form-input">
              <input #statusColor placeholder="输入报警颜色值" formControlName="faultLevelColor" name="faultLevelColor">
            </div>
            <div *ngIf="formErrors.faultLevelColor" class="form-error">
              {{ formErrors.faultLevelColor }}
            </div>
          </div>

          <div class="form-group column">
            <label class="form-label">颜色选择</label>
            <div class="form-input">
              <p-colorPicker formControlName="faultLevelColor2"></p-colorPicker>
            </div>
            <div *ngIf="formErrors.faultLevelColor" class="form-error transparent">
              {{ formErrors.faultLevelColor }}
            </div>
          </div>
        </div>

        <div class="form-group ">
            <label class="form-label">是否报警</label>
            <div class="form-input" id="form-input-switch">
              <label class="form-label __switch">
                    <input type="checkbox" name="unAlarm" formControlName="unAlarm" class="ng-pristine ng-untouched ng-valid">
                    <span class="switch"></span>
                </label>
            </div>
          </div>

        <!-- <div class="form-group">
          <label class="form-label"></label>
          <div class="form-control __checkbox">
            <label class="form-label">
              <input type="checkbox" [checked]="isChecked" formControlName="unAlarm">
              <span class="check"></span>
            </label>
            <label class="form-label">是否报警</label>
          </div>
        </div> -->

        <div class="form-group">
          <label class="form-label">报警声音选择</label>
          <div class="form-input">
            <select name="soundId" formControlName="soundId">
              <option value="0">请选择</option>
              <option [value]="s.soundId" *ngFor="let s of soundFileData">
                {{s.soundName}}
              </option>               
            </select>
          </div>
        </div>

        <div class="form-group">
          <label class="form-label">设备</label>
          <div class="form-input">
            <select name="deviceCategoryId" formControlName="deviceCategoryId">
              <option value="0">请选择</option>
              <option [value]="c.deviceCategoryId" *ngFor="let c of categoryFileData">
                {{c.deviceCategoryName}}
              </option>               
            </select>
          </div>
        </div>

        <!-- <div class="form-group">
          <label class="form-label">是否报警</label>
          <div class="form-input" id="form-input-switch">
            <label class="form-label __switch">
                    <input type="checkbox" name="unAlarm" formControlName="unAlarm" class="ng-pristine ng-untouched ng-valid">
                    <span class="switch"></span>
                </label>
          </div>
        </div> -->


      </form>
      <!-- <div class="form-group">
          <label class="form-label">报警声音上传</label>
          <div class="form-input">
            <input placeholder="输入文件名称">
          </div>
        </div>
        <div class="form-group">
          <p-fileUpload mode="basic" showUploadButton="false" chooseLabel="上传" name="demo[]" accept="audio/*" (onSelect)="myUploader($event)"></p-fileUpload>
        </div> -->
    </div>
  </div>
</div>